import axios from "axios";
import dayjs from "dayjs";
import "../utils/utils";

const message = 123;
console.log(message);

//使用axios
axios.get("http://jsonplaceholder.typicode.com/posts").then(res => {
  console.log(res, "111");
  const div = document.createElement("div");
  div.innerText = JSON.stringify(res);
  document.body.append(div);
});

const time = document.createElement("div");
document.body.append(time);

setInterval(() => {
  const dayTime = dayjs(Date.now()).format("YYYY-MM-DD  HH:mm:ss");

  time.innerText = dayTime;
}, 100);
